#include <iostream>
using namespace std;
int main() {
  // 2 3 5 7 11 13...
  // px ^ py = 1     ===>    abs(px - py) = 1
  // [101010101111]0
  // [101010101111]1
  // codeforces    div2    1,2,3,4
  int a, b;
  int T;
  cin >> T;
  while (T--) {
    cin >> a >> b;
    cout << (a + b == 3 ? "Yes" : "No") << endl;
  }
}